﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/AdminMasterPage.master"
    AutoEventWireup="true" CodeFile="WRPRICETYPEManager.aspx.cs" Inherits="Admin_Pages_WRPRICETYPEManager" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script language="javascript" type="text/javascript">
        Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(
        function () {
            if (document.getElementById) {
                var progress = document.getElementById('progress');
                var blur = document.getElementById('blur');
                progress.style.width = '300px';
                progress.style.height = '30px';
                blur.style.height = document.documentElement.clientHeight;
                progress.style.top = document.documentElement.clientHeight / 3 - progress.style.height.replace('px', '') / 2 + 'px';
                progress.style.left = document.body.offsetWidth / 2 - progress.style.width.replace('px', '') / 2 + 'px';
            }
        }
    )
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
     <h1><asp:Label ID="lbPriceType" runat="server" Text="<%$ Resources:AllSite,lbPriceType_userResource1 %>"></asp:Label></h1>
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <asp:Panel runat="server" ID="pnShow">
                <div class="Control">
                    <ul>
                        <li>
                            <asp:LinkButton runat="server" CssClass="vadd" ID="btnAdd" OnClick="btnAdd_Click" Text="<%$ Resources:AllSite,btnAdd_Resource1 %>"></asp:LinkButton>
                        </li>
                        <li>
                            <asp:LinkButton runat="server" CssClass="vdelete" ID="btnDelete" OnClick="btnDelete_Click" Text="<%$ Resources:AllSite,btnDelete_Resource1 %>"></asp:LinkButton>
                        </li>
                    </ul>
                </div>
                <asp:DataGrid runat="server" ID="grvWRPRICETYPE" Width="100%" CssClass="TableView"
                    AutoGenerateColumns="False" AllowPaging="True" PageSize="9" PagerStyle-Mode="NumericPages"
                    PagerStyle-HorizontalAlign="Center" OnItemCommand="grvWRPRICETYPE_ItemCommand"
                    OnPageIndexChanged="grvWRPRICETYPE_PageIndexChanged">
                    <HeaderStyle CssClass="trHeader"></HeaderStyle>
                    <ItemStyle CssClass="trOdd"></ItemStyle>
                    <AlternatingItemStyle CssClass="trEven"></AlternatingItemStyle>
                    <Columns>
                        <asp:TemplateColumn ItemStyle-CssClass="tdCenter">
                            <ItemTemplate>
                                <asp:CheckBox ID="chkSelect" runat="server"></asp:CheckBox>
                            </ItemTemplate>
                            <ItemStyle CssClass="tdCenter"></ItemStyle>
                        </asp:TemplateColumn>
                        <asp:BoundColumn DataField="ID" HeaderText="ID" Visible="False" />
                        <asp:BoundColumn DataField="PriceTypeName" HeaderText="<%$ Resources:AllSite,PriceTypeName_Resource1 %>" ItemStyle-CssClass="Function" />
                        <asp:BoundColumn DataField="UpdateDate" HeaderText="<%$ Resources:AllSite,UpdateDate_userResource1 %>" ItemStyle-CssClass="Time" />
                        <asp:BoundColumn DataField="Name" HeaderText="<%$ Resources:AllSite,UpdateDate_userResource1 %>" ItemStyle-CssClass="Function" />
                        <asp:BoundColumn DataField="LangName" HeaderText="<%$ Resources:AllSite,LangName_userResource1 %>" ItemStyle-CssClass="Function" />
                        <asp:BoundColumn DataField="Keywords" HeaderText="<%$ Resources:AllSite,Keywords_userResource1 %>" ItemStyle-CssClass="Function" />
                        <asp:BoundColumn DataField="Active" HeaderText="<%$ Resources:AllSite,Active_userResource1 %>" ItemStyle-CssClass="Active" />
                        <asp:TemplateColumn ItemStyle-CssClass="Option">
                            <HeaderTemplate>
                                 <asp:Label ID="Option" runat="server" Text="<%$ Resources:AllSite,Option_userResource1 %>"></asp:Label> 
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:ImageButton ID="btnEdit" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"ID") %>'
                                    CommandName="Edit" ImageUrl="~/Admin/Images/edit.png" ToolTip="<%$ Resources:AllSite,btnEdit_userResource1 %>" />
                                |
                                <asp:ImageButton ID="btnDelete" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"ID") %>'
                                    CommandName="Delete" ImageUrl="~/Admin/Images/delete.png" OnClientClick="return confirm('Are you sure?')"
                                    ToolTip="<%$ Resources:AllSite,btnDelete_userResource1 %>" />
                            </ItemTemplate>
                        </asp:TemplateColumn>
                    </Columns>
                    <PagerStyle HorizontalAlign="Center" CssClass="gridview" Position="Bottom" NextPageText="Previous"
                        PrevPageText="Next" Mode="NumericPages" Height="30"></PagerStyle>
                </asp:DataGrid>
            </asp:Panel>
            <asp:Panel runat="server" ID="pnUpdate">
                <div class="TableUpdate">
                    <div class="mainquoc" style="visibility: hidden">
                        <div class="quoclable">
                            <asp:Label ID="lbID" runat="server" Visible="False"></asp:Label>
                        </div>
                        <div class="quocinput_detail">
                            <asp:TextBox ID="txtID" runat="server" Visible="False"></asp:TextBox>
                        </div>
                        <div class="quoclable">
                            <asp:Label ID="lbCreateDate" runat="server" Text="<%$ Resources:AllSite,lbCreateDate_userResource1 %>" Visible="False"></asp:Label>
                        </div>
                        <div class="quocinput_detail">
                            <asp:TextBox ID="txtCreateDate" runat="server" Visible="False"></asp:TextBox>
                        </div>
                        <div class="quoclable">
                            <asp:Label ID="lbIDCreateBy" runat="server" Text="<%$ Resources:AllSite,lbIDCreateBy_userResource1 %>" Visible="False"></asp:Label>
                        </div>
                        <div class="quocinput_detail">
                            <asp:TextBox ID="txtIDCreateBy" runat="server" Visible="False"></asp:TextBox>
                        </div>
                        <div class="quoclable">
                            <asp:Label ID="lbUpdateDate" runat="server" Text="<%$ Resources:AllSite,lbUpdateDate_userResource1 %>" Visible="False"></asp:Label>
                        </div>
                        <div class="quocinput_detail">
                            <asp:TextBox ID="txtUpdateDate" runat="server" Visible="False"></asp:TextBox>
                        </div>
                        <div class="quoclable">
                            <asp:Label ID="lbIDUpdateBy" runat="server" Text="<%$ Resources:AllSite,lbIDUpdateBy_userResource1 %>" Visible="False"></asp:Label>
                        </div>
                        <div class="quocinput_detail">
                            <asp:TextBox ID="txtIDUpdateBy" runat="server" Visible="False"></asp:TextBox>
                        </div>
                    </div>
                    <div style="padding: 0px 0px 0px 30px">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="BulletList"
                HeaderText="You must enter a value in the following fields:" ForeColor="red" EnableClientScript="True"/>
            </div>
                <div class="mainquoc">
                    <div class="quoclable">
                        <asp:Label ID="lbPriceTypeName" runat="server" Text="<%$ Resources:AllSite,lbPriceTypeName_userResource1 %>"></asp:Label>
                    </div>
                    <div class="quocinput_detail">
                        <asp:TextBox ID="txtPriceTypeName" runat="server" CssClass="text" MaxLength="50"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ErrorMessage="PriceTypeName is required" Text="(*)" 
                    ControlToValidate="txtPriceTypeName" ForeColor="red"></asp:RequiredFieldValidator>
                    </div>
                    <div class="quoclable">
                        <asp:Label ID="lbIDLang" runat="server" Text="<%$ Resources:AllSite,lbIDLang_userResource1 %>"></asp:Label>
                    </div>
                    <div class="quocinput_detail">
                        <asp:DropDownList ID="dropIDLang" runat="server" CssClass="dropdown">
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="mainquoc">
                    <div class="quoclable">
                        <asp:Label ID="lbDescription" runat="server" Text="<%$ Resources:AllSite,lbDescription_userResource1 %>"></asp:Label>
                    </div>
                    <div class="quocinput_detail">
                        <asp:TextBox ID="txtDescription" runat="server" CssClass="text multiline" TextMode="MultiLine" MaxLength="100"></asp:TextBox>
                    </div>
                    <div class="quoclable">
                        <asp:Label ID="lbActive" runat="server" Text="<%$ Resources:AllSite,lbActive_userResource1 %>"></asp:Label>
                    </div>
                    <div class="quocinput_detail">
                        <asp:DropDownList ID="dropActive" runat="server" CssClass="dropdown">
                            <asp:ListItem Value="Y">Y</asp:ListItem>
                            <asp:ListItem Value="N">N</asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
                <div class="mainquoc">
                    <div class="quoclable">
                        <asp:Label ID="lbKeywords" runat="server" Text="<%$ Resources:AllSite,lbKeywords_userResource1 %>"></asp:Label>
                    </div>
                    <div class="quocinput_detail">
                        <asp:TextBox ID="txtKeywords" runat="server" CssClass="text" MaxLength="50"></asp:TextBox>
                    </div>
                </div>
                </div>
                <div class="Control">
                    <ul>
                        <li>
                            <asp:LinkButton runat="server" Text="<%$ Resources:AllSite,btnUpdate_userResource1 %>" CssClass="uupdate" ID="btnOk" OnClick="btnOk_Click">Update</asp:LinkButton>
                        </li>
                        <li>
                            <asp:LinkButton runat="server" Text="<%$ Resources:AllSite,btnBack_userResource1 %>" CssClass="uback" ID="btnBack" 
                                OnClick="btnBack_Click" CausesValidation="False">Back</asp:LinkButton>
                        </li>
                    </ul>
                </div>

            </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnBack" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnDelete" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnOk" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress" runat="server">
        <ProgressTemplate>
            <div id="progress">
                <asp:Image ID="Image2" runat="server" ImageUrl="~/Admin/Images/loading6.gif" />
            </div>
            <div id="blur" />
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>
